
// import { isvalidUsername } from '@/utils/validate'

export default {

  data() {
    /* const validateUsername = (rule, value, callback) => {
      if (!isvalidUsername(value)) {
        callback(new Error('请输入正确的用户名'))
      } else {
        callback()
      }
    } */
    const validatePass = (rule, value, callback) => {
      if (value.length < 4) {
        callback(new Error('请输入正确的密码'))
      } else {
        callback()
      }
    }
    return {
      accountRules: {
        // username: [{ required: true, trigger: 'blur', validator: validateUsername }],
        password: [{ required: true, trigger: 'blur', validator: validatePass }]
      }
    }
  },

  methods: {

  }

}
